/**
 * FileName:         VideoEyeController.java
 * @Description:     TODO
 * @author:            zl
 * @version            V1.0
 * Createdate:      2019年1月11日     下午3:12:09
 * Copyright:       
 * Company           CY.
 * All rights Reserved, Designed By crane-yuan

 * Modification  History:
 * Date         Author        Version        Discription
 * ---------------------------------------------------------------------------
 * 2019年1月11日     crane-yuan       1.0             1.0

 * Why & What is modified:

 */
package com.Brewing.springboot.controller.TpVideoEye;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.Brewing.springboot.common.BrewingJSONResult;
import com.Brewing.springboot.common.PagedResult;
import com.Brewing.springboot.controller.BasicController;
import com.Brewing.springboot.service.TpVideosEye.VideosEyeService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Company: </p>
 * @author  庄磊
 * @date	2019年1月11日 下午3:12:09 
 * @version 1.0
 */
@RestController
@Api(value = "VideoEye-Api", tags = { "VideoEye-Api" })
@RequestMapping("/videoEye")
public class VideoEyeController extends BasicController{
	
	@Autowired
	private VideosEyeService videosEyeService;
	
	@ApiOperation(value = "查询视频", notes = "查询视频的接口")
	@PostMapping(value="/videoList")
	public BrewingJSONResult videoList(String categoriesId,@RequestParam(defaultValue = "1") Integer page) {
		PagedResult result = videosEyeService.getVideos(categoriesId,page,PAGE_SIZE);
		return BrewingJSONResult.ok(result);
	}
	
	@ApiOperation(value = "查询派出id的视频，推荐用", notes = "查询视频的接口")
	@PostMapping(value="/eqvideoList")
	public BrewingJSONResult eqvideoList(String id,String categoriesId,@RequestParam(defaultValue = "1") Integer page) {
		PagedResult result = videosEyeService.getEqVideos(id,categoriesId,page,PAGE_SIZE);
		return BrewingJSONResult.ok(result);
	}
}
